from django.http import HttpResponse
from models import Member
from forms import NameForm
from django.shortcuts import render_to_response

def myFirstView(request):
    return HttpResponse("Hello World!")

def membersList(request):
    variables = {"members":Member.objects.all()}
    return render_to_response("members\\list.html",variables)

def formView(request):
    f = NameForm(request.GET)
    if f.is_valid():
        return render_to_response("members\\welcome.html",{"name":f.getName()})
    return render_to_response("members\\form.html",{"form":f})